<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>{$ts['site']['site_name']}管理后台</title>
<link href="__PUBLIC__/admin/style.css" rel="stylesheet" type="text/css">
<link href="__PUBLIC__/js/tbox/box.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="__PUBLIC__/js/jquery.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/tbox/box.js"></script>
</head>
<body>

<script>
var _ROOT_  = '__ROOT__';

$(document).ready(function(){
    // 鼠标浮在表格时展示特效
    $("tr[hoverstyle='on']").hover(
        function () { $(this).addClass("bg_hover"); },
        function () { $(this).removeClass("bg_hover"); }
    );
    
    // form表单的最后一个元素不加lineD样式
    $("form > dl").last().removeClass("lineD");
});

// 搜索显隐藏
function toggleBlock(element_id, default_hidden)
{
    if (!element_id)
        return false;

	var $element = $("#"+element_id);
	var display  = $element.css('display');

    if ('none' == display)
    	$element.slideDown('fast');
    else
        $("#"+element_id).slideUp('fast');
}

function checkAll(o)
{
    if( o.checked == true ){
        $('input[name="checkbox"]').attr('checked','true');
        $('tr[overstyle="on"]').addClass("bg_on");
    }else{
        $('input[name="checkbox"]').removeAttr('checked');
        $('tr[overstyle="on"]').removeClass("bg_on");
    }
}

function checkon(o)
{
    if( o.checked == true ){
        $(o).parents('tr').addClass('bg_on') ;
    }else{
        $(o).parents('tr').removeClass('bg_on') ;
    }
}

function getChecked()
{
    var ids = new Array();
    var id;
    $.each($('table input:checked'), function(i, n){
    	id = $(n).val();
        if (id > 0) ids.push(id);
    });
    return ids;
}
</script>